<template>
  <div>

    <ul class="mui-table-view">
      <li class="mui-table-view-cell mui-media" v-for="item in content" :key="item.link">
        <router-link :to='"/home/newsinfo/"+ item.pubdate'>
          <img class="mui-media-object mui-pull-left" src="../../images/menu1.png">
          <div class="mui-media-body">
            <h1> {{item.title}}</h1>
            <p class='mui-ellipsis'>
              <span>发布时间：{{item.pubdate}}</span>
              <span>版权：{{item.copyright}}</span>
            </p>
          </div>
        </router-link>
      </li>
    </ul>

  </div>
</template>



<script>
export default {
  data() {
    return {
      content: ''
    };
  },
  mounted() {
    this.axios.post('http://api.komavideo.com/news/list').then(body => {
      this.content = body.data;
    });
  },
  created() {
    console.log(this.$route);
  }
};
</script>


<style scoped>
.mui-media-body h1 {
  font-size: 13px;
  color: #e74c3c;
}
.mui-ellipsis {
  display: flex;
  justify-content: space-between;
  color: #3498db;
}
</style>
